<%@page import="com.yunhuakeji.wddx.utils.IsNull"%>
<%@page import="net.sf.json.JSONObject"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
JSONObject result;
try{
	result = JSONObject.fromObject(request.getAttribute("result")).getJSONObject("content").getJSONObject("message");
}
catch(Exception e){
	result = null;
}
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>我的住宿</title>
     <meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no,minimum-scale=1.0,maximum-scale=1.0">
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<link rel="stylesheet" type="text/css" href="css/myreport.css">
	<link rel="stylesheet" type="text/css" href="css/selectStyle.css">
	<script src="js/jquery.min.js"></script>
	<script src="js/selectCustom.js"></script>
	<script src="js/highcharts.js"></script>
	<script src="js/myReport.js"></script>
  </head>
  
  <body>
    	<%if(IsNull.isNotNull(result.toString())){ %>
    	<div class="myData-info-head">
    		<ul>
    			<li><a data-url="jbxx">公寓信息</a></li>
    			<li><a data-url="lxdh">寝室物品信息</a></li>
    			<li><a data-url="qtxx">公寓违纪信息</a></li>
    			<li><a data-url="jtcyxx">寝室异动信息</a></li>
    			<div class="clear"></div>
    		</ul>
    	</div>
    	<!-- 公寓信息 -->
    	<div class="myData-info-menu">
	    	<div class="active bg-color-gray pt10" id="jbxx">
	    		<%for(int i =0;i<result.getJSONArray("gyxx").size();i++){ %>
	    		<%if(i == 0){ %>
	    			<div class="bg-color-white">
	    		<%}else{ %>
	    			<div class="bg-color-white mt10">
	    		<%} %>
	    			<dl>
	    				<dd>楼栋</dd>
	    				<dt><%=result.getJSONArray("gyxx").getJSONObject(i).getString("ld") %></dt>
	    				<div class="clear"></div>
	    			</dl>
	    			<dl>
	    				<dd>层号</dd>
	    				<dt><%=result.getJSONArray("gyxx").getJSONObject(i).getString("ch") %></dt>
	    				<div class="clear"></div>
	    			</dl>
	    			<dl>
	    				<dd>寝室号</dd>
	    				<dt><%=result.getJSONArray("gyxx").getJSONObject(i).getString("qsh") %></dt>
	    				<div class="clear"></div>
	    			</dl>
	    			<dl>
	    				<dd>床位号</dd>
	    				<dt><%=result.getJSONArray("gyxx").getJSONObject(i).getString("cwh") %></dt>
	    				<div class="clear"></div>
	    			</dl>
	    			<dl>
	    				<dd>寝室电话</dd>
	    				<dt><%=result.getJSONArray("gyxx").getJSONObject(i).getString("qsdh") %></dt>
	    				<div class="clear"></div>
	    			</dl>
	    		<%} %>
	    		</div>
	    	</div>
	    	<!-- 寝室物品信息 -->
	    	<div class="bg-color-gray pt10" id="lxdh">
	    		<div class="bg-color-white">
	    			<table>
	    				<tbody>
	    					<tr class="table-head">
	    						<th>物品名称</th>
	    						<th>数量</th>
	    						<th>是否在合格期</th>
	    						<th>是否完好</th>
	    					</tr>
	    				</tbody>
	    				<tbody>
	    					<%for(int i=0;i<result.getJSONArray("qswpxx").size();i++){ %>
	    					<tr>
	    						<td><%=result.getJSONArray("qswpxx").getJSONObject(i).getString("wpmc") %></td>
	    						<td><%=result.getJSONArray("qswpxx").getJSONObject(i).getString("sl") %></td>
	    						<td><%=result.getJSONArray("qswpxx").getJSONObject(i).getString("sfzhgq") %></td>
	    						<td><%=result.getJSONArray("qswpxx").getJSONObject(i).getString("sfwh") %></td>
	    					</tr>
	    					<%} %>
	    				</tbody>
	    			</table>
	    		</div>
	    	</div>
	    	<!-- 公寓违纪信息 -->
	    	<div class="bg-color-gray pt10" id="qtxx">
	    		<div class="bg-color-white">
	    			<table>
	    				<tbody>
	    					<tr class="table-head">
	    						<th>违纪时间</th>
	    						<th>违纪类别</th>
	    						<th>处理结果</th>
	    					</tr>
	    				</tbody>
	    				<tbody>
	    				<%for(int i=0;i<result.getJSONArray("gyjlxx").size();i++){ %>
	    					<tr>
	    						<td><%=result.getJSONArray("gyjlxx").getJSONObject(i).getString("wjsj") %></td>
	    						<td><%=result.getJSONArray("gyjlxx").getJSONObject(i).getString("wjlb") %></td>
	    						<td><%=result.getJSONArray("gyjlxx").getJSONObject(i).getString("cljg") %></td>
	    					</tr>
	    					<%} %>
	    				</tbody>
	    			</table>
	    		</div>
	    	</div>
	    	<!-- 寝室异动信息 -->
	    	
	    	<div class="pt10 bg-color-gray" id="jtcyxx">
	    	<%for(int i=0;i<result.getJSONArray("qsydxx").size();i++){ %>
	    		<%if(i == 0){ %>
	    			<div class="bg-color-white">
	    		<%}else{ %>
	    			<div class="bg-color-white mt10">
	    		<%} %>
	    			<dl>
	    				<dd>学年</dd>
	    				<dt><%=result.getJSONArray("qsydxx").getJSONObject(i).getString("xn") %></dt>
	    				<div class="clear"></div>
	    			</dl>
	    			<dl>
	    				<dd>学期</dd>
	    				<dt><%=result.getJSONArray("qsydxx").getJSONObject(i).getString("xq") %></dt>
	    				<div class="clear"></div>
	    			</dl>
	    			<dl>
	    				<dd>寝室异动类型</dd>
	    				<dt><%=result.getJSONArray("qsydxx").getJSONObject(i).getString("ssydlx") %></dt>
	    				<div class="clear"></div>
	    			</dl>
	    			<dl>
	    				<dd>退宿寝室</dd>
	    				<dt><%=result.getJSONArray("qsydxx").getJSONObject(i).getString("tsqs") %></dt>
	    				<div class="clear"></div>
	    			</dl>
	    			<dl>
	    				<dd>入住寝室</dd>
	    				<dt><%=result.getJSONArray("qsydxx").getJSONObject(i).getString("rzqs") %></dt>
	    				<div class="clear"></div>
	    			</dl>
	    			<dl>
	    				<dd>宿舍调整原因</dd>
	    				<dt><%=result.getJSONArray("qsydxx").getJSONObject(i).getString("sstzyy") %></dt>
	    				<div class="clear"></div>
	    			</dl>
	    			<dl>
	    				<dd>宿舍调整时间</dd>
	    				<dt><%=result.getJSONArray("qsydxx").getJSONObject(i).getString("sstzsj") %></dt>
	    				<div class="clear"></div>
	    			</dl>
	    		</div>
	    		<%} %>
	    		</div> 
    	</div>
  <script>
 //创建myreport对象
/*  var report = new myReport(); */
//控制切换显示内容以及标题
$(function(){
//默认高亮按钮
	$("a[data-url="+$(".active").attr("id")+"]").css("background","#8cd06c");
//切换显示内容	
	$('.myData-info-head ul li a').bind('click',function(){
		$('.myData-info-head ul li a').css("background","");
		$(this).css("background","#8cd06c");
		$(".active").removeClass("active");
		$("#"+$(this).attr("data-url")).addClass("active");
	});
});
</script>
<%}else{ %>
       <div class="noData">
            <img alt="" src="img/noData.png">
            <div class="mt20">暂无数据</div>
       </div>
   <%} %>
  </body>
</html>
